package com.kaifamiao.www.demo.Do27.Test;

public class Student extends Person {
    public static void main(String[] args) {

            Student stu = new Student();//public
            stu.name = "张三";//public
            stu.publicMehtod();//protected
            stu.age = 18;//protected
            stu.habby = "女";//package-access
            stu.packageAccessMethod();//package-access
            //stu.money = 10000;//private
            //stu.privateMethod();//private

        }
        //重载（overloading）
        public void a(){}
        public void a(int a){}

        //重写/覆盖
        @Override
        public void eat(){
            System.out.println("吃火锅");
        }
    }
